﻿<%@ Page Title="添加" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="AdminStudAdd.aspx.cs" Inherits="admin_AdminStudAdd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div class="am-cf am-padding">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">添加学生</strong> / <small>add student</small></div>
    </div>
    <div class="am-tabs am-margin" data-am-tabs="">
        <ul class="am-tabs-nav am-nav am-nav-tabs">
            <li class="am-active"><a href="#tab1">系统添加</a></li>
            <li><a href="#tab2">管理员添加</a></li>
            <li><a href="#tab3">审核</a></li>
        </ul>

        <div class="am-tabs-bd" style="touch-action: pan-y; -webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
            <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right">学号 / 身份证号</div>
                    <div class="am-u-sm-8 am-u-md-10 am-form">
                        <asp:TextBox runat="server" CssClass="am-input-sm" Width="320px" Style="display: inline-block; float: left;" placeholder="学号 / 身份证号" ID="txtStudID"></asp:TextBox>
                        <asp:LinkButton runat="server" CssClass="am-btn" Text="查 找" Style="float: left; margin-left: 8px; background-color: rgb(0, 148, 255); color: #fff; height: 38px;" ID="btnSearch" OnClick="btnSearch_Click" />
                        
                        <asp:Label runat="server" ID="errorTips" Visible="false" Style="color: red; float: left; line-height: 38px;">需要添加该记录,请添加</asp:Label>
                    </div>
                </div>
                 <div class="am-g" style="margin-top:16px;">
                    <div class="am-u-sm-12">
                        <asp:GridView ID="gv" runat="server" DataKeyNames="StudIdcard" PageSize="12" AllowPaging="True" AutoGenerateColumns="false" CssClass="am-table am-table-striped am-table-hover table-main"  GridLines="None">
                            <Columns>
                                <asp:TemplateField HeaderText="序号">
                                    <HeaderStyle Width="60px"></HeaderStyle>
                                    <ItemTemplate>
                                        <%# Container.DataItemIndex + 1%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="StudName" HeaderText="姓名" ItemStyle-Width="100px" />
                                <asp:BoundField DataField="StudSex" HeaderText="性别" ItemStyle-Width="50px" />
                                <asp:BoundField DataField="StudDeptName" HeaderText="院系" ItemStyle-Width="150px" />
                                <asp:BoundField DataField="StudClassName" HeaderText="班级" ItemStyle-Width="100px" />
                                <asp:BoundField DataField="StudID" ItemStyle-Width="100px"  HeaderText="学号" />
                                <asp:BoundField DataField="StudFrom" ItemStyle-Width="100px"  HeaderText="院校" />
                            </Columns>
                        </asp:GridView>
                    </div>
                </div>
                 <div class="am-g" style="margin-top:16px;">
                    <div class="am-u-sm-12">
                        <asp:GridView ID="gv_view" runat="server" DataKeyNames="IDCard" PageSize="12" AllowPaging="True" AutoGenerateColumns="false" CssClass="am-table am-table-striped am-table-hover table-main"  GridLines="None" OnRowCommand="gv_view_RowCommand" >
                            <Columns>
                                <asp:TemplateField HeaderText="序号">
                                    <HeaderStyle Width="60px"></HeaderStyle>
                                    <ItemTemplate>
                                        <%# Container.DataItemIndex + 1%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="StudName" HeaderText="姓名" ItemStyle-Width="100px" />
                                <asp:BoundField DataField="StudSex" HeaderText="性别" ItemStyle-Width="50px" />
                                <asp:BoundField DataField="DeptName" HeaderText="院系" ItemStyle-Width="150px" />
                                <asp:BoundField DataField="ClassName" HeaderText="班级" ItemStyle-Width="100px" />
                                <asp:BoundField DataField="StudID" ItemStyle-Width="100px"  HeaderText="学号" />
                                <asp:BoundField DataField="studfrom" ItemStyle-Width="100px"  HeaderText="院校" />

                                <asp:TemplateField HeaderText="操作" ItemStyle-Width="100px">
                                    <ItemTemplate >
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs" style="position: relative;">
                                                <asp:LinkButton CssClass="am-btn am-btn-default am-btn-xs am-text-secondary apply-                  edit" ID="lbtnAddUser" runat="server" CommandName="add"><span class="am-icon-pencil-square-o"></                      span>&nbsp;添加</asp:LinkButton>
                                            </div>
                                        </div>
                                        </div>
                                    </ItemTemplate>
                                    
                                </asp:TemplateField>

                            </Columns>
                        </asp:GridView>
                    </div>
                </div>
            </div>

            <div class="am-tab-panel am-fade" id="tab2">
                <div class="am-form">
                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            姓名
                        </div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <asp:TextBox runat="server" type="text" ID="txtName" CssClass="am-input-sm" required="required" />
                        </div>
                        <div class="am-hide-sm-only am-u-md-6">*必填，不可重复</div>
                    </div>

                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            身份证号
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                            <asp:TextBox runat="server" ID="txtIdCard" type="text" CssClass="am-input-sm" required="required"/>
                        </div>
                    </div>

                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            性别
                        </div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <div class="am-btn-group data-am-button">
                                <label class="am-btn am-btn-default am-btn-sm">
                                    <asp:RadioButton ID="rbMan" runat="server" Checked="true" GroupName="rbSex" />
                                    先生
                                </label>
                                <label class="am-btn am-btn-default am-btn-sm">
                                    <asp:RadioButton ID="rbMale" runat="server" GroupName="rbSex" />
                                    女士
                                </label>
                            </div>
                        </div>
                        <div class="am-hide-sm-only am-u-md-6">*选填</div>
                    </div>

                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            学号
                        </div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <asp:TextBox runat="server" ID="txtStudentId" type="text" CssClass="am-input-sm" required="required"/>
                        </div>
                        <div class="am-u-sm-12 am-u-md-6">*必填,不可重复</div>
                    </div>
                    <div class="am-g am-margin-top">
                        <div class="am-form-group">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">来源</div>
                            <div class="am-u-sm-8 am-u-md-10">
                                <asp:DropDownList data-am-selected="{btnSize: 'sm'}" Style="display: none;" ID="ltFrom" runat="server">
                                    <asp:ListItem>湖北汽车工业学院</asp:ListItem>
                                    <asp:ListItem>湖北汽车工业学院科技学院</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>
                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            专业
                        </div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <asp:TextBox runat="server" required="required" ID="txtDeptName" type="text" class="am-input-sm"/>
                        </div>
                        <div class="am-u-sm-12 am-u-md-6">*必填</div>
                    </div>
                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            班级
                        </div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <asp:TextBox runat="server" required="required" ID="txtClassName" type="text" class="am-input-sm"/>
                        </div>
                        <div class="am-u-sm-12 am-u-md-6">*必填</div>
                    </div>
                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            入学年份
                        </div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <asp:TextBox runat="server" required="required" ID="txtEnterYear" type="text" class="am-input-sm"/>
                        </div>
                        <div class="am-u-sm-12 am-u-md-6">*必填</div>
                    </div>
                    <div class="am-margin">
                        <asp:Button runat="server" style="margin-left:240px;"  CssClass="am-btn am-btn-primary am-btn-default" Text="添 加" ID="addStudent" OnClick="addStudent_Click"/>
                        <asp:Label runat="server" ID="addTips" Visible="false" Style="color: red; float: left; line-height: 38px;"></asp:Label>
                    </div>
                </div>                
            </div>

            <div class="am-tab-panel am-fade" id="tab3">
                功能开发~ing！
            </div>

        </div>
    </div>

</asp:Content>

